package com.zzh.wsss.mapper;

import com.zzh.wsss.pojo.Admin;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface AdminOperateMapper {

    @Select("select admin_password from admin where admin_username=#{username}")
    List<Admin> getPassword(@Param("username") String username);

    @Select("select admin_username from admin where admin_username=#{username}")
    Admin getAdminMag(@Param("username") String username);

    @Update("update admin set admin_password=#{newpassword} where admin_username=#{username}")
    void SetUserPassword(@Param("username")String username, @Param("newpassword") String newpassword);
}
